async function test1() {
  const a = await test2();
  return a + 1;
}

async function test2() {
  consoleLog('test2. called.');
  await sleep(2000);
  consoleLog('test2. end.');
  return 2;
}

function sleep(millis) {
  return new Promise((resolve, reject) => {
    setTimeout(resolve, millis)
  })
}